package com.zs.rocketmqstream.oldway;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cloud.stream.annotation.EnableBinding;
import org.springframework.cloud.stream.annotation.StreamListener;
import org.springframework.stereotype.Component;

/**
 * @author madison
 * @description
 * @date 2021/7/4 15:19
 */
@Component
@EnableBinding(StreamClient.class)
public class MQReceiver {
    private final Logger logger =
            LoggerFactory.getLogger(MQReceiver.class);

    @StreamListener(StreamClient.INPUT)
    public void receiveMessage(String receiveMsg) {
        logger.info(" Receive message: {}", receiveMsg);
    }
}
